import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [{
        name: 'home',
        path: '/',
        component: () =>
            import ('../views/cart-home.vue'),
        children: [{
                path: "hpage1",
                component: () =>
                    import ('../homepages/home-page1.vue')
            },
            {
                path: "hpage2",
                component: () =>
                    import ('../homepages/home-page2.vue')
            },
            {
                path: "hpage3",
                component: () =>
                    import ('../homepages/home-page3.vue')
            },
            {
                path: "hpage4",
                component: () =>
                    import ('../homepages/home-page4.vue')
            },
            {
                path: "hpage5",
                component: () =>
                    import ('../homepages/home-page5.vue')
            },
            {
                path: "hpage6",
                component: () =>
                    import ('../homepages/home-page6.vue')
            },
            {
                path: "hpage7",
                component: () =>
                    import ('../homepages/home-page7.vue')
            },
        ]
    }, {
        path: "demo",
        component: () =>
            import ('../views/cart-demo.vue')
    }, {
        path: '/search',
        name: "search",
        component: () =>
            import ('../views/cart-search.vue'),
        children: [{
                path: "cartall",
                component: () =>
                    import ('../cartsearch/cart-all.vue')
            },
            {
                path: "cartcinema",
                component: () =>
                    import ('../cartsearch/cart-cinema.vue')
            },
            {
                path: "cartfilm",
                component: () =>
                    import ('../cartsearch/cart-film.vue')
            },
        ]
    }, {
        path: "/detail",
        name: 'detail',
        component: () =>
            import ('../views/cart-detail.vue')
    }, {
        path: "/ticket",
        name: "ticket",
        component: () =>
            import ('../views/cart-ticket.vue')
    }, {
        path: "/rdVideo",
        name: 'rdVideo',
        component: () =>
            import ('../views/cart-rdvideo.vue')
    }, {
        path: '/cinemaTicket',
        name: 'cinemaTicket',
        component: () =>
            import ('../pages/cinemaTicket.vue')
    }, {
        path: '/movieBuy',
        name: 'movieBuy',
        component: () =>
            import ('../pages/movieBuy.vue')
    }, {
        path: '/cinemaVenue',
        name: 'cinemaVenue',
        component: () =>
            import ('../pages/cinemaVenue.vue')
    }, {
        path: "/movie",
        name: "homeMovie",
        component: () =>
            import ('../views/cart-movie.vue')
    }, {
        path: "/center",
        name: 'homeCenter',
        component: () =>
            import ('../views/cart-center.vue')
    }, {
        path: '/addres',
        name: 'addres',
        component: () =>
            import ('../pages/movieAddres.vue')
    },
    {
        path: '/register',
        name: 'register',
        component: () =>
            import ('../loginpages/cart-register.vue')
    },
    {
        path: '/login',
        name: 'login',
        component: () =>
            import ('../loginpages/cart-login.vue')
    },
    {
        path: '/think',
        component: () =>
            import ('../userpage/user-think.vue')
    }
]

const router = new VueRouter({
    routes
})

export default router